#!/usr/bin/env python


n = int(raw_input())
a = []
for i in range(n+1): 
	x, y = map(int, raw_input().split())
	a.append((x, y))

p = 1
for i in range(n+1):
	p = p * a[i][0]
print p

